﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HalfpipeDemo.Data.Model;
using Halfpipe.Data.Service;
using Halfpipe.Data.Repository;

namespace HalfpipeDemo.Data.Service
{
    public class EmployeeService : CrudService<Employee>, IEmployeeService
    {
        public IQueryable<Employee> SelectAllSupervisors()
        {
            return from e in Repository.SelectAll()
                   where e.Supervised.Any()
                   select e;
        }

        public EmployeeService(IRepository<Employee> repository) : base(repository) {}
    }
}
